%h1 List Adverts
%table
  %tr
    %th Name
    %th Adveriser Name
    %th Owner
    %th Views
    %th Is Active
    %th Operations
  -for advert in @adverts
    %tr
      %td
        =link_to advert.name, admin_advert_url(advert)
      %td
        =advert.advertiser_name
      %td
        =advert.user.full_name
      %td
        =advert.view_count
      %td
        =advert.is_active
      %td
        =link_to "Remove", [:admin,advert], :method=>:delete, :confirm=>"Are you sure you want to delete Advert #{advert.name}"

=link_to "New Advert", new_admin_advert_url   
  